#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdbool.h>
#include<math.h>

bool JudgePrime(int n)
{
	int i = 2;
	for (i = 2; i <= sqrt(n); i++)
	{
		if (n % i == 0)
			break;
	}
	if (i > sqrt(n))
		return true;
	return false;
}


int main()
{
	int n = 0;
	scanf("%d", &n);
	int i = 0;
	int count = 0;
	for (i = 2; i <= n; i++)
	{
		if (JudgePrime(i))
			count++;
	}
	printf("%d\n", count);
	return 0;
}